//package org.jeecg.modules.power.rabbitmq.listener;
//
//import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
//import lombok.RequiredArgsConstructor;
//import lombok.extern.slf4j.Slf4j;
//import org.jeecg.modules.power.rabbitmq.QueueList;
//import org.jeecg.modules.power.user.entity.YlUser;
//import org.jeecg.modules.power.user.service.IYlUserService;
//import org.springframework.amqp.rabbit.annotation.Queue;
//import org.springframework.amqp.rabbit.annotation.RabbitListener;
//import org.springframework.stereotype.Component;
//
///**
// * 会员过期处理逻辑
// * @author scw
// * @version v1.0
// * @date
// */
//@Slf4j
//@Component
//@RequiredArgsConstructor
//public class MemberListener {
//
//    private final IYlUserService userService;
//
//    @RabbitListener(queuesToDeclare = @Queue(QueueList.member))
//    public void member(YlUser user){
//        UpdateWrapper wrapper = new UpdateWrapper();
//        wrapper.set("is_member",0);
//        wrapper.eq("id",user.getId());
//        wrapper.eq("end_time",user.getEndTime());
//        boolean res = userService.update(wrapper);
//        log.info("用户{}的会员已于{}过期",user.getNickname(),user.getEndTime());
//    }
//
//}
